/**
 * @description 分组模型类
 * @author AI Assistant
 * @date 2023-10-27
 */

import { BaseModel } from './base'

export class Group extends BaseModel {
  constructor(data = {}) {
    super(data)
    this.name = data.name || ''
    this.listId = data.listId || ''
    this.tasks = data.tasks || []
    this.order = data.order || 0
  }

  toJSON() {
    return {
      ...super.toJSON(),
      name: this.name,
      listId: this.listId,
      tasks: this.tasks,
      order: this.order
    }
  }
} 